
// <copyright file="IDbCallbackStrategy.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   This strategy encapsulates the required three delegates (ie BeforeExecuteDelegate, AfterExecuteDelegate and
//   InitializeCommandDelegate).
//   It can be passed to a GenericDbDataSource or GenericDataSink.
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Data
{
    /// <summary>
    /// This strategy encapsulates the required three delegates (ie BeforeExecuteDelegate, AfterExecuteDelegate and
    ///     InitializeCommandDelegate).
    ///     It can be passed to a GenericDbDataSource or GenericDataSink.
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    public interface IDbCallbackStrategy<in T>
    {
        #region Public Properties

        /// <summary>
        ///     Gets the after execute.
        /// </summary>
        /// <value>The after execute.</value>
        AfterExecuteDelegate<T> AfterExecute { get; }

        /// <summary>
        ///     Gets the before execute.
        /// </summary>
        /// <value>The before execute.</value>
        BeforeExecuteDelegate<T> BeforeExecute { get; }

        /// <summary>
        ///     Gets a value indicating whether [execute asynchronous reader].
        /// </summary>
        /// <value>
        ///     <c>true</c> if [execute asynchronous reader]; otherwise, <c>false</c>.
        /// </value>
        bool ExecuteAsReader { get; }

        /// <summary>
        ///     Gets the initialize command.
        /// </summary>
        /// <value>The initialize command.</value>
        InitializeCommandDelegate InitializeCommand { get; }

        #endregion Public Properties
    }
}
